/*
 * @Descripttion: 文件说明
 * @version: V1.0
 * @Author: GW
 * @Date: 2021-07-29 10:40:41
 * @LastEditors: GW
 * @LastEditTime: 2021-12-20 14:06:44
 */
import { axios } from '../../utils/request'

/**
 * 生产计划
 */
const api = {
    save: '/production/plan/save',
    examine: '/production/plan/examine',
    delete: '/production/plan/delete',
    getcode: '/production/plan/getCode',
    merge: '/production/plan/merge',
    split: '/production/plan/split',

    closed: '/production/plan/closed',
}

/**
 * 保存
 */
export function closed(data) {
    return axios({
        url: api.closed,
        method: "get",
        params: data
    })
}


/**
 * 保存
 */
export function save(data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

/**
 * 审核
 */
export function examine(data) {
    return axios({
        url: api.examine,
        method: "get",
        params: data
    })
}

/**
 * 删除
 */
export function remove(data) {
    return axios({
        url: api.delete,
        method: "DELETE",
        params: data
    })
}

/**
 * 获取单据编号
 */
export function getCode(data) {
    return axios({
        url: api.getcode,
        method: "get",
        params: data
    })
}

/**
 * 单据提交
 */
export function submitOrder(data) {
    return axios({
        url: '/production/plan/submit',
        method: "get",
        params: data
    })
}

/**
 * 合并
 */
export function setMerge(data) {
    return axios({
        url: api.merge,
        method: "post",
        data: data
    })
}
/**
 * 拆分
 */
export function setSplit(data) {
    return axios({
        url: api.split,
        method: "post",
        data: data
    })
}